import request from '../util/request'

// 用户注册
export function registerUser (data) {
  return request({
    url: '/hospital-system/login/register/user',
    method: 'post',
    data: {
      email: data.email,
      idCard: data.idCard,
      name: data.name,
      password: data.password,
      phone: data.phone,
      sex: data.sex,
      verify: data.verify
    }
  })
}

// 医院注册
export function registerHospital (data) {
  return request({
    url: '/hospital-system/login/register/hospital',
    method: 'post',
    data: {
      email: data.email,
      idCard: data.idCard,
      name: data.name,
      password: data.password,
      phone: data.phone,
      verify: data.verify,
      manager: data.manager,
      certificate: data.certificate,
      province: data.province,
      city: data.city,
      area: data.area,
      town: data.town,
      detail: data.detail
    }
  })
}

// 发送验证码
export function registerSendEmail (data) {
  return request({
    url: '/hospital-system/login/send-email',
    method: 'post',
    data: {
      email: data.email
    }
  })
}
